package com.qf.team2.netdisc.service;

import com.alipay.api.AlipayApiException;
import com.qf.team2.netdisc.common.pojo.entity.AlipayOrder;
import com.qf.team2.netdisc.common.pojo.qo.AlipayOrderQO;

/**
 * 支付宝服务接口
 *
 * @author Simon_Wong
 * @date 2021/05/25 10:57
 */
@SuppressWarnings("AlibabaLowerCamelCaseVariableNaming")
public interface AlipayOrderService {

    /**
     * 支付宝支付接口
     *
     * @param alipayOrder 订单
     * @return {@link String}
     * @throws AlipayApiException 支付宝api异常
     */
    String aliPay(AlipayOrder alipayOrder) throws AlipayApiException;

    /**
     * 添加订单
     *
     * @param alipayOrderQO 订单参数对象:
     * @return {@link AlipayOrderQO}
     */
    AlipayOrderQO addOrder(AlipayOrderQO alipayOrderQO);

    /**
     * 设置订单状态
     *
     * @param orderId 订单id
     * @param status  状态
     * @return {@link AlipayOrder}
     */
    AlipayOrder setOrderStatus(Integer orderId, int status);
}
